//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Spreadsheet
{
    public class ProtectedRange: IOfficeXmlSerializable
    {
        #region IOfficeXmlSerializable Members

        void IOfficeXmlSerializable.ReadXml(ReadContext context)
        {
            using (ReadContext c = context.Read("protectedRange"))
            {
                password = c.GetOptionalString("password");
                sqref = c.GetString("sqref");
                Name = c.GetString("name");
                SecurityDescriptor = c.GetOptionalString("securityDescriptor");
            }
        }

        void IOfficeXmlSerializable.WriteXml(WriteContext context)
        {
            using (WriteContext c = context.Write("protectedRange"))
            {
                c.SetOptionalString("password",password);
                c.SetString("sqref", sqref);
                c.SetString("name", Name);
                c.SetOptionalString("securityDescriptor", SecurityDescriptor);
            }
        }
        private string password;

        public string Password
        {
            get { return password; }
            set { password = value; }
        }
        private string sqref;

        public string Sqref
        {
            get { return sqref; }
            set { sqref = value; }
        }
        private string name;

        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        private string securityDescriptor;

        public string SecurityDescriptor
        {
            get { return securityDescriptor; }
            set { securityDescriptor = value; }
        }
	
	
	
        #endregion
    }
}
